package com.youkeyi.ddy.cloud.common.api.application.system.login;

import com.youkeyi.ddy.cloud.common.api.application.system.login.dto.OfficialLoginAuthCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.system.login.param.OfficialLoginAuthCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import com.youkeyi.ddy.cloud.common.response.ResponseObjectContent;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * SystemOfficialLoginFeignServiceFallback
 *
 * @Author liuxiawang
 * @Date 2023-02-16 11:37
 * @Location shenzhen.china
 */
@Component
@RequestMapping("/system/official/login/fallback")
public class SystemOfficialLoginFeignServiceFallback implements SystemOfficialLoginFeignService {


    @Override
    public OfficialLoginAuthCloudDto getPageUrl(OfficialLoginAuthCloudParam param) {
        return new OfficialLoginAuthCloudDto(Boolean.FALSE, "服务不可用");
    }
    @Override
    public OfficialLoginAuthCloudDto checkAuthorizationStatus(String state) {
        return new OfficialLoginAuthCloudDto(Boolean.FALSE, "服务不可用");
    }
    @Override
    public ResponseContent handleCallback( String code,  String state) {
        return new ResponseContent(Boolean.FALSE, "服务不可用");
    }

    @Override
    public  ResponseContent bindUserByPhoneAndOpenidAndUnionId( String phone, String unionId,  String openId){
        return new ResponseContent(Boolean.FALSE, "服务不可用");
    }

    @Override
    public ResponseObjectContent getToken(OfficialLoginAuthCloudParam param) {
        return new ResponseObjectContent(Boolean.FALSE, "服务不可用");
    }

    @Override
    public ResponseContent logout(HttpServletRequest request, HttpServletResponse response) {
        return new ResponseContent(Boolean.FALSE, "服务不可用");
    }

    @Override
    public ResponseObjectContent getWeChatOfficialConfig(@RequestParam String url){
        return new ResponseObjectContent(Boolean.FALSE, "服务不可用");
    }
}
